<?php

namespace app\admin\validate;

use think\Validate;

class ShopGoodsValidate extends Validate
{
    protected $rule = [
        'title'            => 'require|max:50',
        'thumbnail'        => 'require',
        'photo_urls'       => 'require',
        'content'          => 'require',
        'shop_id'          => 'require',
    ];

    protected $message = [
        'title.require'            => '请输入标题',
        'title.max'                => '标题太长',
        'shop_id.require'          => '请选择商品类型',
        'thumbnail.require'        => '请上传封面图',
        'photo_urls.require'       => '请上传轮播图',
        'content.require'          => '请填写内容',
    ];
}
